package com.tanhua.model.enums;

public enum ReportType {

    LION("狮子型:介绍.................................",
            "https://xiongyu-tanhua.oss-cn-beijing.aliyuncs.com/test/ac62ba94-169b-46d8-b9c6-7266acb2a51f.jpg",
            1),
    RABBIT("兔子型:介绍.................................",
            "https://xiongyu-tanhua.oss-cn-beijing.aliyuncs.com/test/b91cca29-89dd-49c3-b705-f4d16b884933.jpg",
            2),
    FOX("狐狸型:介绍.....................................",
            "https://xiongyu-tanhua.oss-cn-beijing.aliyuncs.com/test/c8d05db3-b8cf-4e5c-a616-af845800b749.jpg",
            3);

    private String conclusion;
    private String cover;
    private int index;

    ReportType(String conclusion,String cover,int index){
        this.conclusion = conclusion;
        this.cover = cover;
        this.index = index;
    }

    public static String getConclusion(int index){
        for (ReportType value : ReportType.values()) {
            if (value.getIndex()==index) {
                return  value.conclusion;
            }
        }
        return null;
    }

    public static String getCover(int index){
        for (ReportType value : ReportType.values()) {
            if (value.getIndex()==index) {
                return  value.cover;
            }
        }
        return null;
    }

    public void setConclusion(String conclusion) {
        this.conclusion = conclusion;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }
}
